import 'package:car_map/mode/spuare_type_mode.dart';
import 'package:car_map/page/res/styles.dart';
import 'package:car_map/widget/widget_cityInspiration_item.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///城市灵感
class WidgetCityInspiration extends StatelessWidget {

  final List<SpuareTypeModel> spuareCityList;

  const WidgetCityInspiration({Key key, this.spuareCityList}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      margin: EdgeInsets.only(top: 1.0),
      color: Colors.white,
      padding: EdgeInsets.all(10.0),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Text(
            '城市灵感',
            style: TextStyles.textBold30,
          ),
         Container(
           padding: EdgeInsets.only(top: 10.0),
           height: ScreenUtil().setHeight(300.0),
           child:  ListView.builder(itemBuilder: (context,index){
             return WidgetCityInspirationItem(spuareTypeModel: spuareCityList[index],);
           },itemCount: spuareCityList.length,scrollDirection: Axis.horizontal,shrinkWrap: true,),
         )

        ],
      ),
    );
  }
}
